package com.zzx.model;

import java.util.Date;
import java.util.List;

import javax.validation.constraints.Min;
import javax.validation.constraints.Pattern;

public class User {

	private List<String> books;
	
	public List<String> getBooks() {
		return books;
	}

	public void setBooks(List<String> books) {
		this.books = books;
	}

	private String name;
	@Pattern(regexp="\\w{6,15}")
	private Integer password;
	@Min(value=29,message="id不能小于29")
	private Integer id;
	private Date bir;

	public Date getBir() {
		return bir;
	}

	public void setBir(Date bir) {
		this.bir = bir;
	}

	public Integer getPassword() {
		return password;
	}

	public void setPassword(Integer integer) {
		this.password = integer;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return "User [books=" + books + ", name=" + name + ", password=" + password + ", id=" + id + ", bir=" + bir
				+ "]";
	}

	public User(String name, Integer password, Integer id, Date bir) {
		this.name = name;
		this.password = password;
		this.id = id;
		this.bir = bir;
	}

	public User() {
	}
	
	
}
